package com.zhuiyun.project.api.appusermessage.mapper;

import com.zhuiyun.project.api.appusermessage.entity.Disease;
import com.zhuiyun.project.common.mapper.BaseMapper;
import com.zhuiyun.project.common.response.CommonResult;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @ClassName DiseaseMapper
 * @Description TODO
 * @Author Root
 * @Date 2023/6/28 14:22
 **/
@Mapper
public interface DiseaseMapper extends BaseMapper<Disease> {
    @Select("select * from sys_dict_data where dict_id = #{dictId}")
    List<Disease> getDiseaseById(Integer dictId);

    /**
    * @Author kdj
    * @Description 根据病例id获取病例Label
    * @Date 2023/7/27 19:02
    * @Return java.lang.String
    * @param dataId
    */
    @Select("select dict_label from sys_dict_data where dict_id = 4 and data_id=#{dataId}")
    String getDiseaseLabel(Integer dataId);
}
